# jdk8
# export JAVA_HOME=
# export JRE_HOME=

if [ ! -f "./alinesno-upload-qiniu-tools.jar" ];then
  version=1.0
  wget -O alinenso-upload-qiniu-tools.jar http://data.linesno.com/tools/alinenso-upload-qiniu-tools-${version}.jar
else
  echo "文件[alinesno-upload-qiniu-tools.jar]已经存在"
fi

accessKey="YJWlm_dypHR9UbXKcibpEzpDY8Ve_VbCLjhaG9Ne"
secretKey="-zR3es1i54oIWNDqAPMo_PRhwetS7PK4ZoVI5_O9"
spaceBucket="training-data"
domain="http://data.linesno.com"
localFolder=$1
remoteFolder="alinesno-cloud-initializr-ui"
overrideUpload=true
refresh=true

echo "执行的文件名：$1"

java -jar ./alinenso-upload-qiniu-tools.jar \
    $accessKey \
    $secretKey \
    $spaceBucket \
    $domain \
    $localFolder \
    $remoteFolder \
    $overrideUpload \
    $refresh
